Fixing a Plotly figure

Your colleague had started a project to create a visualization of sales for the first three months of 2020. However, she then left for some annual leave - but the boss wants the visualization now!

You can see she left behind a dictionary object that has started to define the visualization. It is your task to finish this dictionary with the important key arguments so it can be turned into a Plotly visualization.

In the exercises where it is needed throughout the course, plotly.graph_objects has already been loaded as go.

There is a monthly_sales dictionary that has been partially complete also available.

Student scores bar graph

The school board has asked you to come and look at some test scores. They want an easy way to visualize the score of different students within a small class. This seems like a simple use case to practice your bar chart skills!

In this exercise, you will help the school board team by creating a bar chart of school test score values.

A DataFrame student_scores has been provided.

Box plot of company revenues

You have been contracted by a New York Stock exchange firm who are interested in upping their data visualization capabilities.

They are cautious about this new technology so have tasked you with something simple first. To display the distribution of the revenues of top companies in the USA. They are particularly interested in what kind of revenue puts you in the 'top bracket' of companies.

They also want to know if there are any outliers and how they can explore this in the plot. This sounds like a perfect opportunity for a box plot.

In this exercise, you will help the investment team by creating a box plot of the revenue of top US companies.

Histogram of company revenues

The New York Stock exchange firm loved your previous box plot and want you to do more work for them.

The box plot was a perfect visualization to help them understand the outliers and quartile-related attributes of their company revenue dataset.

However, they want to understand a bit more about the distribution of the data. Are there many companies with smaller revenue, or larger revenue? Is it somewhat bell-shaped or skewed towards higher or lower revenues?

In this exercise, you will help the investment team by creating a histogram of the revenue of top US companies.

Coloring student scores bar graph

The previous plot that you created was well received by the school board, but they are wondering if there is a way for you to visually identify good and bad performers.

This would be a great opportunity to utilize color. Specifically, a color scale. You think a scale from red (worst marks) to green (good marks) would be great.

Part of your previous code to create the student scores bar chart has been provided.

Side-by-side revenue box plots with color

The New York Stock Exchange firm you did work for previously has contracted you to extend on your work building the box plot of company revenues.

They want to understand how different industries compare using this same visualization technique from before. They are also particular about what colors are used for what industries. They have prepared a list of industries and the colors as below.

Your task is to create a box plot of company revenues, as before, but include the specified colors based on the list of industries given below.

There is a revenues DataFrame already loaded for your use.

Industry-color RGB definitions:

Tech = 124, 250, 120

Oil = 112,128,144

Pharmaceuticals = 137, 109, 247

Professional Services = 255, 0, 0

Revenue histogram with stacked bars

The New York Stock exchange firm thought your previous histogram provided great insight into how the revenue of the firms they are looking at is distributed.

However, like before, they are interested in learning a bit more about how the industry of the firms could shed more light on what is happening.

Your task is to re-create the histogram of company revenues, as before, but include the specified colors based on the list of industries given below.